﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Robotics.Race
{
	class ListConverter
	{
		static public List<T> ConvertList<T, B>( List<B> source ) where T : B
		{
			List<T> result = new List<T>();
			foreach ( B item in source )
			{
				result.Add( (T)item );
			}
			return result;
		}

		static public List<B> ReversedConvertList<T, B>( List<T> source ) where T : B
		{
			List<B> result = new List<B>();
			foreach ( T item in source )
			{
				result.Add( item );
			}
			return result;
		}
	}
}
